package com.framework.service.impl;

import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.framework.dao.FlowNoticeTerDao;
import com.framework.entity.flow.FlowNoticeTer;
import com.framework.page.PageUtils;
import com.framework.service.FlowNoticeTerService;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * 划拨流水
 *
 * @author wq
 */
@Service("flowNoticeTerService")
public class FlowNoticeTerServiceImpl extends ServiceImpl<FlowNoticeTerDao,FlowNoticeTer> implements FlowNoticeTerService {

    @Override
    public PageUtils queryPage(Map<String, Object> params) {

        Integer pageSize= Integer.valueOf(params.get("limit").toString());
        Integer currPage= Integer.valueOf(params.get("page").toString());
        params.put("start",(currPage-1)*pageSize);
        params.put("limit",pageSize);
        List<Map<String, Object>> list=this.baseMapper.queryNoticeList(params);
        Integer totalCount=this.baseMapper.queryNoticeCount(params);
        return new PageUtils(list,totalCount,pageSize,currPage);

    }
}
